#include <stdio.h>
int count(int a);

int main() {
	int sum = 0;
	for (int i = 1; i <= 100; i++) {
		sum += count(i);
	}
	printf("%d", sum);
	return 0;
}

int count(int a) {
	int sum = 0;
	while (a > 0) {
		if (a % 10 == 9) {
			sum += 1;
		}
		a = a / 10;
	}
	return sum;
}